package com.qd.system.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 附件
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("sys_article_file")
public class ArticleFile extends Model<ArticleFile> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "doc_id", type = IdType.ASSIGN_ID)
    private String docId;
    /**
     * 名称
     */
    @TableField("doc_name")
    private String docName;
    /**
     * 路径
     */
    @TableField("doc_path")
    private String docPath;
    /**
     * 大小
     */
    @TableField("doc_size")
    private Long docSize;
    /**
     * 序号
     */
    @TableField("idx")
    private Integer idx;
    /**
     * 文章标识
     */
    @TableField("article_id")
    private String articleId;
    /**
     * 文件类型
     */
    @TableField("attachment_type")
    private String attachmentType;

    public void freeData() {
        this.docId = null;
        this.docName = null;
        this.docPath = null;
        this.docSize = null;
        this.idx = null;
        this.articleId = null;
        this.attachmentType = null;
    }

}
